package com.jinke.api.modules.third.easypost.model.response;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 创建保险返回
 */
@Data
public class CreateInsuranceVO {
    private String id;
    private String object;
    private String mode;
    private String reference;
    private String status;
    private BigDecimal amount;
    private String provider;
    private String providerId;
    private AddressVO toAddress;
    private AddressVO fromAddress;
    private String shipmentId;
    private TrackerVO tracker;
    private String trackingCode;
    private FeeVO fee;
    private List<String> messages;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    // Getters and Setters
    @Data
    public static class AddressVO {
        private String id;
        private String object;
        private LocalDateTime createdAt;
        private LocalDateTime updatedAt;
        private String name;
        private String company;
        private String street1;
        private String street2;
        private String city;
        private String state;
        private String zip;
        private String country;
        private String phone;
        private String email;
        private String mode;
        private Boolean residential;
        private VerificationVO verifications;

        // Getters and Setters
    }
    @Data
    public static class VerificationVO {
        private VerificationDetailVO zip4;
        private VerificationDetailVO delivery;

        // Getters and Setters
    }
    @Data
    public static class VerificationDetailVO {
        private Boolean success;
        private List<String> errors;
        private DeliveryDetails details;

        // Getters and Setters
    }
    @Data
    public static class DeliveryDetails {
        private Double latitude;
        private Double longitude;
        private String timeZone;

        // Getters and Setters
    }
    @Data
    public static class TrackerVO {
        private String id;
        private String object;
        private String mode;
        private String trackingCode;
        private String status;
        private String statusDetail;
        private LocalDateTime createdAt;
        private LocalDateTime updatedAt;
        private String carrier;
        private List<TrackingDetailVO> trackingDetails;
        private Boolean finalized;
        private Boolean isReturn;
        private String publicUrl;

        // Getters and Setters
    }
    @Data
    public static class TrackingDetailVO {
        private String object;
        private String message;
        private String description;
        private String status;
        private String statusDetail;
        private LocalDateTime datetime;
        private String source;
        private TrackingLocationVO trackingLocation;

        // Getters and Setters
    }
    @Data
    public static class TrackingLocationVO {
        private String object;
        private String city;
        private String state;
        private String country;
        private String zip;

        // Getters and Setters
    }
    @Data
    public static class FeeVO {
        private String object;
        private String type;
        private BigDecimal amount;
        private Boolean charged;
        private Boolean refunded;

        // Getters and Setters
    }
}
